<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    
<div id="app">
    <h2>当前计数: {{count}}</h2>

    <!-- v-on 的语法糖 @ -->
    <button @click="increment">+</button>
    <button @click="decrement">-</button>
    
</div>
<script src="../js/vue.js"></script>
<script>

    // proxy : 代理 Model
    const obj = {
        count : 0
    }

    const app = new Vue
    (
        {
            el : "#app",
            data : obj,
            methods : 
            {
                increment()
                {
                    this.count++;
                },
                decrement()
                {
                    this.count--;
                }
            },
        }
    )   
</script>


</body>
</html>